﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace BrainTechLLC.ImageOperatorsNonAForgeDependent
{
    public class BasicResizedBitmap : BasicBitmap
    {
        protected Bitmap _BitmapOriginal;
        protected int _BitmapOriginalWidth;
        protected int _BitmapOriginalHeight;
        protected int _BitmapMaxWidth;
        protected int _BitmapMaxHeight;

        public virtual Bitmap BitmapOriginal
        {
            get { return _BitmapOriginal; }
            set
            {
                if (_BitmapOriginal != value)
                {
                    _BitmapOriginal = value;
                    OnPropertyChanged("BitmapOriginal");
                }
            }
        }

        public virtual int BitmapOriginalWidth
        {
            get { return _BitmapOriginalWidth; }
            set
            {
                if (_BitmapOriginalWidth != value)
                {
                    _BitmapOriginalWidth = value;
                    OnPropertyChanged("BitmapOriginalWidth");
                }
            }
        }

        public virtual int BitmapOriginalHeight
        {
            get { return _BitmapOriginalHeight; }
            set
            {
                if (_BitmapOriginalHeight != value)
                {
                    _BitmapOriginalHeight = value;
                    OnPropertyChanged("BitmapOriginalHeight");
                }
            }
        }

        public virtual int BitmapMaxWidth
        {
            get { return _BitmapMaxWidth; }
            set
            {
                if (_BitmapMaxWidth != value)
                {
                    _BitmapMaxWidth = value;
                    OnPropertyChanged("BitmapMaxWidth");
                }
            }
        }

        public virtual int BitmapMaxHeight
        {
            get { return _BitmapMaxHeight; }
            set
            {
                if (_BitmapMaxHeight != value)
                {
                    _BitmapMaxHeight = value;
                    OnPropertyChanged("BitmapMaxHeight");
                }
            }
        }

        public override void FreeBitmap()
        {
            BitmapOriginal = null;
            BitmapOriginalWidth = 0;
            BitmapOriginalHeight = 0;
            base.FreeBitmap();
        }
    }
}
